From: Andrew Cooper Date: Tue, 12 Sep 2017 12:44:11 +0000 (+0200) Subject: grant_table: fix GNTTABOP_cache_flush handling X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1454 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c3d830b244998b3686e2eb64db95996be5eb5e5c;p=xen.git grant_table: fix GNTTABOP_cache_flush handling Don't fall over a NULL grant_table pointer when the owner of the domain is a system domain (DOMID_{XEN,IO} etc). This is CVE-2017-14318 / XSA-232. Reported-by: Matthew Daley Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index fb3859ce8e..c3895e6201 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -3046,7 +3046,7 @@ static int cache_flush(gnttab_cache_flush_t *cflush, grant_ref_t *cur_ref) page = mfn_to_page(mfn); owner = page_get_owner_and_reference(page); - if ( !owner ) + if ( !owner || !owner->grant_table ) { rcu_unlock_domain(d); return -EPERM;